package com.wlt.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wlt.domain.ItemsCustom;
@Controller
public class JsonTest {
	//请求json(商品信息),输出json(商品信息)
	/**
	 * @RequestBody将请求的商品信息的json串转成itemsCustom对象
	 * @ResponseBody将itemsCustom转成json输出
	 * @param itemsCustom
	 * @return
	 */
	@RequestMapping("/requestJson")
	public @ResponseBody ItemsCustom  requestJson(@RequestBody ItemsCustom itemsCustom) {
		return itemsCustom;
	}
	//请求key/value  输出json
	@RequestMapping("/responseJson")
	public @ResponseBody ItemsCustom  responseJson(ItemsCustom itemsCustom) {
		return itemsCustom;
	}

}
